# 往作业表插入作业，验证导出数量

import pymysql

# 连接到已有的MySQL数据库
conn = pymysql.connect(
    host='172.31.120.53',
    user='fjkt_beta',
    password='yTbQYCyhJO7Vb5dS',
    database='fjkt_homework'
)

# 创建一个游标对象
cursor = conn.cursor()
num = 3412

for i in range(1):
    num += 1
    # 往表中插入数据
    sql = ("INSERT INTO fjkt_homework.fj_homework (id, create_time, update_time, user_id, class_id, class_teacher_id, "
           "subject_id, text_content, content_data_json, homework_state_code, ma_json, ma_risk_descriptions, "
           "ma_data_package_id, latest_comment_ids_json, total_comment_count, total_share_count, total_praise_count, "
           "total_click_count, current_teacher_id, current_allocate_teacher_time, current_teacher_task_id, "
           "current_teacher_comment_id, current_teacher_comment_time, submit_time, main_class_id, homework_state_code1, "
           "reject_reason, is_delete, round_id, type, public_state, change_public_time, score, satisfaction, "
           f"satisfaction_text, semester_id) VALUES ({num}, '2024-04-24 11:07:35', '2024-04-24 14:35:10', "
           "'u2306091615474VIEvx183', 0, 0, 388, '嗯呀', "
           "'[{\"fileId\":\"fjkt/image/2024/04/24/52003637-2c74-4c52-b203-4009348b4b4d.jpg\","
           "\"origFileName\":\"tmp_39ff1e802117f5aada5b6a0d5e40fdce.jpg\",\"type\":3,"
           "\"url\":\"https://fjkt-beta-1302770967.cos.ap-chengdu.myqcloud.com/fjkt/image/2024/04/24/52003637-2c74-4c52"
           "-b203-4009348b4b4d.jpg\"}]', 1, null, '', null, null, 2, 0, 0, 9, 'u230605191249MJxRSB129', '2024-04-24 "
           "14:07:56', 2143, 0, null, '2024-04-24 11:07:36', 0, 2, '', 0, 0, 1, 1, '2024-04-24 11:07:36', 1, 1, null, "
           "1871)")
    cursor.execute(sql)

    # 提交更改
    conn.commit()

# 关闭游标和连接
cursor.close()
conn.close()
